<?php
/**
 * Created by PhpStorm.
 * User: User
 * Date: 2017/9/29
 * Time: 8:21
 */
class  person{
    public $name;
    public $age;
    public $sex;


    public  function __construct($n,$a,$s)
    {
        $this->name=$n;
        $this->sex=$a;
        $this->age=$s;
    }

    public  function say(){
   echo '我的名字'.$this->name
       .',我的性别是'.$this->sex
       .',我的年龄是'.$this->age;
    }

}
$my=new person();
$my->name='mjq';
$my->sex='男';
$my->age='22';
$my->say();
